package com.ice.work.moment.facade.user.controller.user;

import com.honeybee.cloud.framework.common.page.Page;
import com.honeybee.cloud.framework.common.response.ResponseEntity;
import com.ice.work.moment.facade.user.request.PageUserRequest;
import com.ice.work.moment.facade.user.vo.UserVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Description 用户controller
 * @Author DELL
 * @Create 2019-02-11
 * @Since 1.0.0
 */
@FeignClient(value = "moment-user", fallbackFactory = UserHystrixFallbackFactory.class)
public interface IUserController {

    /**
     * 查询用户列表
     *
     * @param request
     * @return
     */
    @PostMapping(value = "/user-page", name = "查询用户列表")
    @PreAuthorize("hasAuthority('USER-0001')")
    ResponseEntity<Page<UserVO>> pageUser(@RequestBody @Validated PageUserRequest request);


}
